package com.lagou.cl.dao;

import com.lagou.cl.pojo.COrder;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;


public interface COrderDao extends JpaRepository<COrder, Long> {

	@Query(nativeQuery = true, value = "select * from c_order where user_id=:userId")
	public List<COrder> findCOrdersByUserId(@Param("userId") Integer userId);
}
